package dw.fastfile.common.exception;

/**
 * @description:
 * @author: wanghao
 * @create: 2023-05-04 14:41
 **/
public class BusinessException extends RuntimeException {
    private String code;
    private static final long serialVersionUID = -1L;

    public BusinessException(String code, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
    }

    public BusinessException(String message, Throwable cause) {
        super(message, cause);
    }

    public BusinessException(String code, String message) {
        super(message);
        this.code = code;
    }

    public BusinessException(String message) {
        super(message);
    }

    public BusinessException(Throwable cause) {
        super(cause.getMessage(), cause);
    }

    public String getCode() {
        return this.code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}
